package com.scy.demo.dao;

import com.scy.demo.pojo.Resume;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;


public interface ResumeDao extends JpaRepository<Resume,Long>, JpaSpecificationExecutor<Resume> {

    @Transactional
    @Modifying
    @Query(value = "update tb_resume t set t.name=?2,t.address=?3,t.phone=?4 where t.id=?1",nativeQuery = true)
    void update(long pk, String name,String address,String phone);
}
